import axios from '@/utils/request'

import config from '@/common/config'

let base = config.getArcBasePath();


/**
 * arc_doc_type
 *1    默认只开放普通查询，所有查询，只要上传	 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，
 *2 查询、新增、修改的参数格式  params={typeId:'类型编号 主键',typeName:'类型名称',typeRemark:'类型备注',branchId:'归属机构号',isPub:'是否公共'}
 **/
 
//普通查询 条件之间and关系  
export const listDocType = params => { return axios.get(`${base}/mdp/arc/doc/docType/list`, { params: params }); };

//模糊查询arc_doc_type 条件之间or关系  
//export const listDocTypeKey = params => { return axios.get(`${base}/mdp/arc/doc/docType/listKey`, { params: params }); };

//删除一条arc_doc_type params={typeId:'类型编号 主键'}
export const delDocType = params => { return axios.post(`${base}/mdp/arc/doc/docType/del`,params); };

//批量删除arc_doc_type  params=[{typeId:'类型编号 主键'}]
export const batchDelDocType = params => { return axios.post(`${base}/mdp/arc/doc/docType/batchDel`, params); };

//修改一条arc_doc_type记录
export const editDocType = params => { return axios.post(`${base}/mdp/arc/doc/docType/edit`, params); };

//新增一条arc_doc_type
export const addDocType = params => { return axios.post(`${base}/mdp/arc/doc/docType/add`, params); };
//查询种类分类并查询关联的公文数
export const docTypelist = params => { return axios.get(`${base}/mdp/arc/doc/docType/listAndCountType`, { params: params }); };
